|
Shed Skin is a Python to C++ programming language compiler. It is experimental, and can translate pure, but implicitly statically typed Python programs into optimized C++. It can generate stand-alone programs or extension modules that can be imported and used in larger Python programs. Shed Skin is an open source project with contributions from many people, however the main author is Mark Dufour. Work has been going into Shed Skin since 2005.〔(first Shed Skin release )〕 == Features == Besides the typing restriction,〔(Learning Python Book section on Shed Skin )〕 programs cannot freely use the Python standard library, although about 20 common modules, such as random, itertools and re (regular expressions), are supported as of 2011. Also, not all Python features, such as nested functions and variable numbers of arguments, are supported. Many introspective dynamic parts of the language are unsupported. For example, functions like getattr, and hasattr are unsupported. As of May 2011, Unicode is not supported.〔(Shed Skin tutorial ("Python Subset Restrictions" section) )〕 For a set of 54 non-trivial test programs (at over 15,000 lines in total (sloccount)), measurements show a typical speedup of 2-20 times over Psyco, and 2-200 times over CPython.〔(Speed up your Python: Unladen vs. Shed Skin vs. PyPy vs. Cython vs. C )〕〔(Taking on Shed-Skin )〕〔(Speeding up Python code with Shed Skin )〕〔(MiniLight, minimal global illumination renderer benchmark )〕 Shed Skin is still in an early stage of development, so many other programs will not compile unmodified.〔(Shed Skin webpage )〕 Shed Skin can be used to generate standalone executables which need only the C++ runtime libraries. It can also be used to generate CPython modules. This allows compiling parts of larger programs with Shed Skin, while running the other parts using regular CPython. Another use has been to wrap C++ classes using Shed Skin to allow C++ classes to be used as Python classes.〔(Wrapping C++ classes using Shed Skin )〕 The license of the Shed Skin source code is under two parts. The main compiler code is under the GNU General Public License (GPL). The supporting code that it uses as a run time library is under a BSD or MIT license depending on the module. This allows compiling programs which are considered under the GPL or are not considered under the GPL. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Shed Skin」の詳細全文を読む スポンサード リンク
|